'use strict';
/**
 * Created by FreezeSoul on 2015/10/28.
 */
define([
    'angular',
    'app/modules/index/define'
],function(angular) {
    angular.module('ad.index')
        .controller('adIndexBindingEditController',['$scope','$uibModalInstance','item'
            ,function($scope,$uibModalInstance,item) {

                $scope.Name = item.Name;
                $scope.Push = item.PushFrequency;
                $scope.Items = [
                    {value:0,text:'首次'},
                    {value:5,text:'每5分钟'},
                    {value:15,text:'每15分钟'},
                    {value:30,text:'每30分钟'},
                    {value:60,text:'每60分钟'}
                ];

                $scope.ok = function () {
                    $uibModalInstance.close([$scope.Name,$scope.Push]);
                };

                $scope.cancel = function () {
                    $uibModalInstance.dismiss('cancel');
                };
            }]);
});